import java.util.Scanner;

public class Text {
    //递归实现
    public static int recursion (String s,String t) {
        //先找字符串t在字符串s中的下标  直接用index方法
        int index = s.indexOf(t);
        if (index == -1) {  //说明没找到
            return 0;
        }
        return 1 + recursion(s.substring(index+t.length()),t);
    }
    public static void main(String[] args) {
        //  给两个字符串 s和t   找出字符串s中有几个字符串t
        //abcde  a3   输出0
        // aaaaaa  aa  输出3
        Scanner scanner  = new Scanner(System.in);
        String s = scanner.next();
        String t = scanner.next();
        int count = recursion(s,t);
        System.out.println(count);
    }
}
